home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Battle of the Superstars
/
Battle of the Superstars.bin
/
pc
/
qt201
/
setup.mst
/
setup.mst
Wrap
Text File
|
1992-12-19
|
22KB
|
604 lines
rem ---------------------------------------------------------------------
rem
rem SETUP.MST - MSSETUP Installation Script
rem
rem Version 2.0
rem
rem (c) Copyright 1988-1994 Apple Computer, Inc. All Rights Reserved.
rem
rem Revised: 12 October 1994
rem Tony Knight, Apple Computer
rem ---------------------------------------------------------------------
rem Required includes to interface with MSSETUP DLL's
rem -------------------------------------------------
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
rem Dialog box id's
rem ---------------
rem Note: If MSSETUP were really smart, we could use the
rem #defines in DIALOGS.HR. Instead, we must manually
rem keep them in step
rem ----------------------------------------------------
CONST NUKEOLD = 101 '' WARNING FOR OLDER VERSIONS
CONST OLDMESS = 102 '' MODELESS DIALOGUE BOX FOR OLDER VERSIONS
CONST DESTPATH = 300 ''Gets destination path
CONST EXITQUIT = 600 ''Exits on user request
CONST EXITSUCCESS = 700 ''Exits when install is done
CONST OPTIONS = 800 ''Gets AUTOEXEC.BAT options
CONST ASKSETUP = 1100 ''Gets installation type (Local etc)
CONST TOOBIG = 6300 ''Not enough space on target disk error
CONST BADPATH = 6400 ''Bad destination path error
CONST BADWINDOWS = 6500 ''Wrong Windows release
CONST EXITFAILURE = 6600 ''Exits on error
rem String id's
rem -----------
rem Note: If MSSETUP were really smart, we could use the
rem #defines in DIALOGS.HR. Instead, we must manually
rem keep them in step
rem ----------------------------------------------------
CONST STR_PLAYER = 1024 ''Movie Player
CONST STR_VIEWER = 1025 ''Picture Viewer
CONST STR_GROUP = 1026 ''Program Manager group
CONST STR_TITLE = 1027 ''Installer Title
CONST STR_MSG1 = 1028 ''Version error message part 1
CONST STR_MSG2 = 1029 ''Version error message part 2
CONST STR_MSG3 = 1030 ''Remove obsolete files?
CONST STR_WARNING = 1031 ''Warning
CONST STR_HELP = 1032 ''Help
CONST STR_SAMPLE = 1033 ''Sample movie
rem Miscellaneous Constants
rem -----------------------
CONST NOLOGO = 1 ''Dummy NULL bitmap (must be 1)
CONST LOGO = 2 ''Background bitmap
CONST MOVIE = 2 ''Movie placeholder bitmap
CONST NOSPACE = 1 ''No space to complete install
CONST INSTALLOK = 2 ''Install completed OK
CONST INSTALLFAILED =3 ''Install failed for some reason
CONST FILES_REMOVED = 1
CONST FILES_SKIPPED = 2
rem Global Variables
rem ----------------
GLOBAL SOURCE$ ''Source directory
GLOBAL DEST$ ''Default destination directory
GLOBAL DEST2$ '' DEST FOR WINDOWS QTW .EXE'S
GLOBAL DEST3$ '' DEST FOR DOCUMENTATION AND INTERFACES
GLOBAL LOCALINST$ ''Local install
GLOBAL CLIENTINST$ ''Client install
GLOBAL SERVERINST$ ''Server install
GLOBAL SETUPPATH$ ''Setup destination path
GLOBAL SETUPTYPE$ ''local,client,server
GLOBAL EXTRACOSTS$ ''List of extra costs to add per drive
GLOBAL APPNEEDS$ ''Disk space costs per drive
GLOBAL SECTIONKEY$ ''INF file section key
GLOBAL SUCCESS% ''Installation completion code
GLOBAL CUIDLL$ ''User interface DLL
GLOBAL HELPPROC$ ''Help dialog procedure
rem Initialize global vriables
rem --------------------------
SOURCE$ = GetSymbolValue("STF_SRCDIR")
DEST$ = GetWindowsSysDir
DEST2$ = GetWindowsDir
DEST3$ = "C:\QTW"
LOCALINST$ = "1"
CLIENTINST$ = "2"
SERVERINST$ = "3"
SETUPPATH$ = DEST$
SETUPTYPE$ = LOCALINST$
APPNEEDS$ = "AppNeeds"
EXTRACOSTS$ = "ExtraCosts"
SECTIONKEY$ = "SectionKey"
SUCCESS% = INSTALLFAILED
FOR i% = 1 TO 26 STEP 1
AddListItem EXTRACOSTS$, "16384"
NEXT i%
rem
rem default dest to first hard drive
rem since some OEM systems don't start at C:
rem
GetLocalHardDrivesList "HardDrives"
NumDrives% = GetListLength("HardDrives")
IF (NUMDRIVES% > 0) THEN
DEST3$ = GetListItem("HardDrives",1) + ":\QTW"
END IF
rem Get name of localized user interface dialogs
rem --------------------------------------------
CUIDLL$ = "SETUP"+GetIniKeyString("WIN.INI", "intl", "sLanguage")+".DLL"
IF DoesFileExist(CUIDLL$, femExists) = 0 THEN
CUIDLL$ = "SETUPENU.DLL"
END IF
rem Subroutines and Functions
rem -------------------------
DECLARE FUNCTION Install AS INTEGER
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION GetQTWVersion LIB "setupenu.dll" (szDLL$) AS INTEGER
DECLARE FUNCTION GetResourceString LIB "setupenu.dll" (szResource$, idString%) AS INTEGER
DECLARE FUNCTION StartCustomSetup LIB "setupenu.dll" (hinst%, hwnd%) AS INTEGER
DECLARE FUNCTION StopCustomSetup LIB "setupenu.dll" (hinst%, hwnd%) AS INTEGER
DECLARE FUNCTION WritePrivateProfileString LIB "krnl386.exe" (szSect$, szEntry$, szString$, szINI$) AS INTEGER
DECLARE FUNCTION CheckForOld AS INTEGER
DECLARE FUNCTION RemoveOldQTFiles (FilePath$) AS INTEGER
DECLARE FUNCTION CheckForSpace (DrivePath$) AS INTEGER
rem Initialize custom setup logic
rem -----------------------------
SetBitmap CUIDLL$, NOLOGO
i% = GetResourceString (CUIDLL$, STR_TITLE)
SetTitle GetSymbolValue ("ResourceString")
i% = StartCustomSetup (HinstFrame(), HwndFrame ())
i% = SetBeepingMode(1)
rem Make sure that we are running on Windows 3.1 or better
rem ------------------------------------------------------
IF GetWindowsMajorVersion() < 3 THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
GOTO CLEANUP
END IF
IF (GetWindowsMajorVersion() = 3) AND (GetWindowsMinorVersion() < 10) THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
GOTO CLEANUP
END IF
rem Make sure that we are running on a 286 or better
rem ------------------------------------------------
IF GetWinFlags() AND 2 THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
GOTO CLEANUP
END IF
rem -------------------------------------------------------------------
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szTemp$ = GetSymbolValue("STF_SRCDIR")
SPLITPATH szTemp$, drv$, dir$, filename$, ext$
szInf$ = szTemp$ + "SETUP.INF"
END IF
ReadInfFile szInf$
rem Get the setup type: Local, Client or Server
rem -------------------------------------------
ITYPE:
SetSymbolValue "RadioDefault", SETUPTYPE$
ITYPEL1:
sz$ = UIStartDlg(CUIDLL$, ASKSETUP, "FRadioDlgProc", 0, "")
SETUPTYPE$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ITYPEL1
ELSE
GOSUB ASKQUIT
GOTO ITYPE
END IF
rem Get the destination path for server install; if it's bad, we display an error
rem ----------------------------------------------------------------
GETPATH2:
IF (SETUPTYPE$ = SERVERINST$) THEN
SetSymbolValue "EditTextIn",DEST3$
SetSymbolValue "EditFocus","ALL"
sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", 0, "")
DEST3$ = GetSymbolValue("EditTex